<% if object.errors.any? %>
    <div class="alert alert-danger">
      <a class="close" data-dismiss="alert">×</a>
      <ul class="error-list">
        <% object.errors.full_messages.each do |message| %>
            <li><%= message %></li>
        <% end %>
      </ul>
    </div>
<% end %>